package com.hunau.cxb.dao.impl;

import com.hunau.cxb.dao.BookDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

/**
 * @author hb
 * @create 2020-03-22 10:35
 */
@Repository
public class BookDaoImpl implements BookDao {
    @Autowired
    private JdbcTemplate jdbcTemplate;
    @Override
    public double queryPrice(String isbn) {
        return jdbcTemplate.queryForObject("select price from t_book where isbn= ?",new Object[]{isbn},Double.class);
    }
}
